package extend.exe;

/**
 * @author shkstart
 * @date 2022/5/9 - 17:18
 */

/*满足JAVA Ben 的要求
* 1.类是公共的
* 2.提供公共的无参构造器
* 3.有属性，如果属性是私有的，那么提供对应的方法*/
public class Kids extends Mankind{
    private int yearsOld;

    public Kids(){

    }

    public Kids(int yearsOld) {
        this.yearsOld = yearsOld;
    }
    public void printAge() {
        System.out.println("我今年" + yearsOld);
    }


    public int getYearsOld() {
        return yearsOld;
    }

    public void setYearsOld(int yearsOld) {
        this.yearsOld = yearsOld;
    }


    public void employeed() {
        System.out.println("kids should study and no job");
    }
}
